﻿package 
{

	public class Grille
	{
		private var typeArr:Array;

		public function Grille(i:int,_main:Main)
		{
			switch (i)
			{
				case 0 :
					typeArr = Config.typeL;
					break;
				case 1 :
					typeArr = Config.typeB;
					break;
				case 2 :
					typeArr = Config.typeZ;
					break;
				case 3 :
					typeArr = Config.typeS;
					break;
				case 4 :
					typeArr = Config.typeI;
					break;
				case 5 :
					typeArr = Config.typeT;
					break;
				case 6 :
					typeArr = Config.typeJ;
					break;
			}
			for (var j:int=0; j<4; j++)
			{

				var arr:Array = typeArr[j];
//				var sq:Square;
//				sq = new Square(Config._SIZE,Config._SIZE,0,arr[0],arr[1]);
//				sq.x = (arr[0]+4) * Config._SIZE + Config.X0;
//				sq.y = arr[1] * Config._SIZE + Config.Y0;
//				_main.addChild(sq);
				_main.worldArr[arr[1]][arr[0]+4]=1;
			}
		}

	}

}